
graph drop _all

estimates restore OC

est sto model
	
	coefplot (model, keep("(hour 8)" "(hour 9)" "(hour 10)" "(hour 11)" "(hour 12)" "(hour 13)" "(hour 14)" "(hour 15)" ///
	"(hour 16)" "(hour 17)" "(hour 18)") msymbol(d) mcolor(gs5) mfcolor(white) ciopts(recast(rcap, lpattern(shortdash))))  ///
	(model, keep("$\Delta$ oc (hour 8)" "$\Delta$ oc (hour 9)"  "$\Delta$ oc (hour 10)" "$\Delta$ oc (hour 11)" "$\Delta$ oc (hour 12)" ///
	"$\Delta$ oc (hour 13)" "$\Delta$ oc (hour 14)" "$\Delta$ oc (hour 15)" ///
	"$\Delta$ oc (hour 16)" "$\Delta$ oc (hour 17)" "$\Delta$ oc (hour 18)") msymbol(o) mcolor(gs0) ciopts(recast(rcap)) ) ///
	, yline(0, lcolor(gs10)) ///
	levels(95) vertical ///
	relocate("(hour 8)"=0.1 "$\Delta$ oc (hour 8)"=0.2 "(hour 9)"=1.1 "$\Delta$ oc (hour 9)"=1.2 "(hour 10)"=2.1 "$\Delta$ oc (hour 10)"=2.2 ///
	"(hour 11)"=3.1 "$\Delta$ oc (hour 11)"=3.2 "(hour 12)"=4.1 "$\Delta$ oc (hour 12)"=4.2 "(hour 13)"=5.1 "$\Delta$ oc (hour 13)"=5.2 ///
	"(hour 14)"=6.1 "$\Delta$ oc (hour 14)"=6.2 ///
	"(hour 15)" =7.1 "$\Delta$ oc (hour 15)" =7.2 "(hour 16)"=8.1 "$\Delta$ oc (hour 16)"=8.2 "(hour 17)"=9.1 "$\Delta$ oc (hour 17)"=9.2 "(hour 18)"=10.1 "$\Delta$ oc (hour 18)"=10.2) ///
	coeflabels("("* = " " ) legend(order(2 "{&eta}{sub:1} (buy price)" 4 "{&eta}{sub:2} ({&Delta}oc)") position(11)  region(style(none)) bmargin(zero) ///
	size(medium) cols(2))  xlabel(none)  xtitle("") xscale(noline axis(1))  plotregion(margin(zero)) ///
	yscale(range(-0.06 0.06)) ylabel(-0.05(0.05)0.05, labsize(small)) ytitle("Coefficient estimate", size(medium))  yline(0, lpattern(dot) lcolor(gs10)) graphregion(lcolor(none) color(white)) scheme(s1mono) plotregion(lcolor(none)) ///
	ysize(1) xsize(3) name(oc_coef) title("Panel A. Coefficients"  , position(11) size(large) ring(7))
	
	
	
	
	
	estimates restore OC2

	
	plotbeta  buy8 - oc8 |   buy9 - oc9 |buy10 - oc10 | buy11 - oc11 |  buy12 - oc12 | ///
	 | buy13 - oc13 |  buy14 - oc14 | buy15 - oc15 | buy16 - oc16 | buy17 - oc17 | buy18 - oc18 , ///
		vertical 	yline(0, lp(solid) lcolor(gs0)) xtitle("Hour-of-day", color(gs0) size(large)) xscale(range(0.8 9))  ///
	labels xlabel(1 "7" 2 "8"  3 "9" 4 "10" 5 "11" 6 "12" 7 "1" 8 "2" 9 "3" 10 "4" 11 "5" , labcolor(gs0) labsize(small)) ///
	ytitle("Difference", size(medium))  yscale(range(-0.05 0.05)) ylabel(-0.05(0.05)0.05, labsize(small)) level(95)  ///
	 graphregion(lcolor(none) color(white)) scheme(s1mono) plotregion(lcolor(none)) ///
	addplot((scatteri 0.048 1, msymbol(diamond) mcolor(gs10) msize(med))) text(0.048 2 " {&eta}{sub:1} - {&eta}{sub:2}", size(medium)) ///
	ysize(1) xsize(3)  xlabel(none , axis(2)) title("Panel B. Test for opportunity cost"  , position(11) size(large) ring(7)) name(diff_oc) 

	
	
	
	graph combine oc_coef  diff_oc , cols(1) 
	
	graph export Results/Andrea/OC_test.pdf, replace

	
	
	
	
